package defpackage; import android.os.Build; import android.text.TextUtils; import cn.wps.moffice.OfficeApp; import cn.wps.moffice_eng.R; import com.iflytek.cloud.SpeechEvent; import com.iflytek.cloud.SpeechUtility; import java.io.IOException; import org.apache.commons.httpclient.HttpState; import org.json.JSONObject; /* renamed from: csi reason: default package */ public final class csi extends fcv<String, Void, csh> { private final a<csh> cwc; /* renamed from: csi$a */ public interface a<Type> { void r(Type type); } public csi(a<csh> aVar) { this.cwc = aVar; } private csh atQ() { String str; OfficeApp arx = OfficeApp.arx(); String string = arx.getString(R.string.app_version); String arA = arx.arA(); String arB = arx.arB(); String str2 = luf.gQ(arx) ? "phone" : "pad"; String str3 = ""; String W = csm.W(arx); if (lul.Iv(W)) { str3 = lwl.IM(W); } String str4 = HttpState.PREEMPTIVE_DEFAULT; if (Build.VERSION.SDK_INT >= 21) { str4 = "true"; } try { str = lwd.c("https://moapi.wps.cn/api/moversion/info", lwv.a("v=%s&c=%s&pc=%s&i=%s&p=%s&l=%s&d=%s&diffsetup=%s&sha1=%s", string, arA, arB, eip.VID, arx.getPackageName(), eip.dHN, str2, str4, str3), null); } catch (IOException e) { e.printStackTrace(); str = ""; } return hh(str); } private static csh hh(String str) { try { if (!TextUtils.isEmpty(str)) { JSONObject jSONObject = new JSONObject(str); if ("ok".equals(jSONObject.getString(SpeechUtility.TAG_RESOURCE_RESULT))) { return (csh) lvb.b(jSONObject.getString(SpeechEvent.KEY_EVENT_RECORD_DATA), csh.class); } } } catch (Exception e) { } return null; } /* Return type fixed from 'java.lang.Object' to match base method */ /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object[]] */ /* access modifiers changed from: protected */ @Override // defpackage.fcv public final /* synthetic */ csh doInBackground(String[] strArr) { return atQ(); } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ /* access modifiers changed from: protected */ @Override // defpackage.fcv public final /* synthetic */ void onPostExecute(csh csh) { csh csh2 = csh; if (csh2 != null) { this.cwc.r(csh2); } } }